import 'package:flutter/material.dart';

import '../../utils/util.dart';
import 'controller.dart';

class DownloadFloatProgress extends StatefulWidget {
  const DownloadFloatProgress({super.key});

  @override
  State<DownloadFloatProgress> createState() => _DownloadFloatProgressState();
}

class _DownloadFloatProgressState extends State<DownloadFloatProgress> {
  double progress = 0;

  void setProgress(double val) {
    progress = val;
    setState(() {});
  }

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return ClipOval(
      child: SizedBox(
        width: 60.r,
        height: 60.r,
        child: Stack(
          children: [
            // Positioned(
            //   child: WaveWidget(
            //     config: CustomConfig(
            //       colors: [
            //         Color(0x5000BBF9),
            //         Color(0xFF00BBF9),
            //       ],
            //       durations: [
            //         3000,
            //         2000,
            //       ],
            //       heightPercentages: [0.3, 0.2],
            //     ),
            //     size: Size(60.r, 60.r),
            //     waveAmplitude: 5,
            //     heightPercentage: 0.5,
            //   ),
            // ),
            Container(
              alignment: Alignment.center,
              width: 60.r,
              height: 60.r,
              child: Text(
                progress.progress,
                style: TextStyle(color: Colors.white, fontSize: 15.sp),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
